package eureka.customer.controller;
import eureka.customer.client.ProviderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping(value = "/customer")
@RestController
public class CustomerController {
    @Autowired
    ProviderClient providerClient;

    @RequestMapping(value = "/con1")
    public String con1(){
        return providerClient.con1();
    }

    @RequestMapping(value = "/con2")
    public String con2(){
        return "con1-" + "CustomerController1";
    }

    @GetMapping("/con3")
    public Object con3(){
        return providerClient.discovery();
    }
}
